package com.ruoyi.datastatistics.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.ruoyi.common.annotation.Excel;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 小冻结数据（设备维度）对象 t_terminals_freeze_xb
 *
 * @author ruoyi
 * @date 2023-09-14
 */
@Data
@TableName("t_terminals_freeze_xb")
public class TerminalsFreezeXb implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * 平台表单自增主键
     */
    @TableId
    private Long id;

    /**
     * 设备归属租户
     */
    @TableField("tenant_id")
    private String tenantId;

    @TableField("location_nb")
    private String locationNb;

    /**
     * 厂家编号
     */
    @Excel(name = "厂家名称")
    @TableField("supplier_id")
    private String supplierId;

    @Excel(name = "设备编号")
    @TableField("terminal_id")
    private String terminalId;

    /**
     * 净累积量
     */
    @Excel(name = "净累积量")
    @TableField("cumulative_flow")
    private BigDecimal cumulativeFlow;

    /**
     * 平均电池电压
     */
    @Excel(name = "平均电池电压")
    @TableField("terminal_vol_avg")
    private BigDecimal terminalVolAvg;

    /**
     * 起始抄表读数
     */
    @Excel(name = "起始抄表读数")
    @TableField("start_reading")
    private BigDecimal startReading;

    /**
     * 起始抄表时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @Excel(name = "起始抄表时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    @TableField("start_reading_time")
    private Date startReadingTime;

    /**
     * 终止抄表读数
     */
    @Excel(name = "终止抄表读数")
    @TableField("end_reading")
    private BigDecimal endReading;

    /**
     * 终止抄表时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @Excel(name = "终止抄表时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    @TableField("end_reading_time")
    private Date endReadingTime;

    /**
     * 用户平均用水量
     */
    @Excel(name = "用户平均用水量（m³）")
    @TableField("user_avg")
    private String userAvg;

    /**
     * 环比上一周期
     */
    @Excel(name = "环比上一周期")
    @TableField("hb")
    private String hb;

    /**
     * 用水状态，报警策略设置的参数计算
     */
    @Excel(name = "用水状态，报警策略设置的参数计算")
    @TableField("param_type")
    private Integer paramType;

    /**
     * 冻结类型，日：day，月：month
     */
    @Excel(name = "冻结类型", readConverterExp = "day=日冻结,month=月冻结")
    @TableField("frozen_type")
    private String frozenType;

    /**
     * 冻结时间（日/月）
     */
    @Excel(name = "冻结时间")
    @TableField("freeze_time")
    private String freezeTime;

    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField("create_time")
    private Date createTime;

    /**
     * 抄回率(1为抄回并可以算出日用量的,2为抄回不能算出日用量的,3为未抄回的)
     */
    @Excel(name = "抄回率")
    @TableField("copy_rate")
    private Integer copyRate;

    @TableField(exist = false)
    @Excel(name = "楼栋名称")
    private String ldName;

    @TableField(exist = false)
    @Excel(name = "用户名称")
    private String userName;

    @TableField(exist = false)
    @Excel(name = "用户编号")
    private String userId;

    @TableField(exist = false)
    @Excel(name = "门牌号")
    private String roomName;

    @Excel(name = "通讯地址")
    @TableField(exist = false)
    private String communicateAddress;

    @TableField(exist = false)
    private String treeRoomId;

    @TableField(exist = false)
    private String belongDepartment;

    @TableField(exist = false)
    private String treeAreaCode;

    @TableField(exist = false)
    private String treeLdId;

    @TableField(exist = false)
    private String installAddress;

    @TableField(exist = false)
    private String startTime;

    @TableField(exist = false)
    private String endTime;

    @JsonIgnore
    @TableField(exist = false)
    private String lastFreezeTime;

}
